package com.zut.dao;

import com.zut.pojo.Repay;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

public interface RepayDao {

    // 进行回报表格添加操作
    @Insert("insert into repay(user_id,type,paymoney,rule,content,number,time,product_id) values (#{userId},#{type},#{paymoney},#{rule},#{content},#{number},#{time},#{productId})")
    Integer addRepay(Repay repay);

    // 根据产品id 查询回报
    @Select("select  * from repay where id=#{id}")
    Repay selectRepayByProductId(@RequestParam("id") Integer id);
}
